package com.siyu.rehearsal.previewresult.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.rehearsal.previewresult.mapper.PreviewResultMapper;
import com.siyu.rehearsal.previewresult.domain.PreviewResult;
import com.siyu.rehearsal.previewresult.service.IPreviewResultService;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.rehearsal.previewresult.mapper.PreviewResultMapper;
import com.siyu.rehearsal.previewresult.domain.PreviewResult;
import com.siyu.rehearsal.previewresult.service.IPreviewResultService;

/**
 * 预演计算结果Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-15
 */
@Service
public class PreviewResultServiceImpl extends ServiceImpl<PreviewResultMapper, PreviewResult> implements IPreviewResultService
{
    @Autowired
    private PreviewResultMapper previewResultMapper;

    /**
     * 查询预演计算结果
     *
     * @param id 预演计算结果主键
     * @return 预演计算结果
     */
    @Override
    public PreviewResult selectPreviewResultById(String id)
    {
        return previewResultMapper.selectPreviewResultById(id);
    }

    /**
     * 查询预演计算结果列表
     *
     * @param previewResult 预演计算结果
     * @return 预演计算结果
     */
    @Override
    public List<PreviewResult> selectPreviewResultList(PreviewResult previewResult)
    {
        return previewResultMapper.selectPreviewResultList(previewResult);
    }

    /**
     * 新增预演计算结果
     *
     * @param previewResult 预演计算结果
     * @return 结果
     */
    @Override
    public int insertPreviewResult(PreviewResult previewResult)
    {
            return previewResultMapper.insertPreviewResult(previewResult);
    }

    /**
     * 修改预演计算结果
     *
     * @param previewResult 预演计算结果
     * @return 结果
     */
    @Override
    public int updatePreviewResult(PreviewResult previewResult)
    {
        return previewResultMapper.updatePreviewResult(previewResult);
    }

    /**
     * 批量删除预演计算结果
     *
     * @param ids 需要删除的预演计算结果主键
     * @return 结果
     */
    @Override
    public int deletePreviewResultByIds(String[] ids)
    {
        return previewResultMapper.deletePreviewResultByIds(ids);
    }

    /**
     * 删除预演计算结果信息
     *
     * @param id 预演计算结果主键
     * @return 结果
     */
    @Override
    public int deletePreviewResultById(String id)
    {
        return previewResultMapper.deletePreviewResultById(id);
    }
}


